package com.base.service.system.vo;

import java.util.List;

import com.base.core.head.vo.IdVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author start
 */
@Getter@Setter@ToString
public class AuthVO extends IdVO implements Comparable<AuthVO> {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Schema(description="父ID")
	private Long parentId;

    @Schema(description="接口名称")
	private String name;

    @Schema(description="操作码")
	private String action;

    @Schema(description="接口地址")
	private String uri;

    @Schema(description="请求方法")
	private String method;
	
    @Schema(description="排序值")
	private Integer sort;

    @Schema(description="子权限")
    private List<AuthVO> items;

	@Override
	public int compareTo(AuthVO o) {
		return o.getSort() - this.getSort();
	}

}
